package com.cqw.commontest;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.StringUtils;

/**
 * @author cqw
 * @date 2022/7/25
 */
public class Test2222 {

    public static void main(String[] args) {

//        YouShuOrder youShuOrder = new YouShuOrder();
//
//        WeChatGoodsInfo weChatGoodsInfo = new WeChatGoodsInfo();
//        weChatGoodsInfo.setGoodsNum(1);
//        weChatGoodsInfo.setCategoryName("23432323");
//        youShuOrder.setWeChatGoodsInfo(Lists.newArrayList(weChatGoodsInfo));
//
//        JSONObject youshuJson = new JSONObject();
//        JSONArray orderJson = new JSONArray();
//        orderJson.add(youShuOrder);
//        youshuJson.put("orders", orderJson);
//        String content = youshuJson.toString();
//        System.out.println(content);

        System.out.println(StringUtils.isEmpty(""));


        String vichy = getMessage("111", "4");
        System.out.println(vichy);
    }


    public static String getMessage(String storeCode, String type) {
        switch (storeCode) {
            case "vichy":
                switch (type) {
                    case "1":
                        return "您已达到领取上限，无法再次领取~";
                    case "2":
                    case "3":
                        return "很抱歉，您暂无领取资格";
                    case "4":
                        return "优惠券领取失败，请稍后再试或者联系客服";
                    default:
                        return null;
                }
            case "takami":
                switch (type) {
                    case "1":
                        return "已达领取上限";
                    case "2":
                    case "3":
                        return "您暂无领取资格";
                    case "4":
                        return "领取失败";
                    default:
                        return null;
                }
            default:
                switch (type) {
                    case "1":
                        return "您已达到领取上限，无法再次领取~";
                    case "2":
                        return "特殊限制不满足";
                    case "3":
                        return "订单过滤限制不满足";
                    case "4":
                        return "优惠券领取失败，请稍后再试或者联系客服";
                    default:
                        return null;
                }
        }

    }

}
